import 'dart:io';

import 'package:flutter_elf/network/http_managers.dart';

import 'http_request.dart';

String url = 'https://gkcx.eol.cn/school/search';
void main()async{

  HttpClient client = new HttpClient();
  client.getUrl(Uri.parse("https://gkcx.eol.cn/school/140"))
      .then((HttpClientRequest request) {
    // Prepare the request then call close on it to send it.
    return request.close();
  })
      .then((HttpClientResponse response) {
        response.listen((r){
          print(String.fromCharCodes(r));
        });
        print(response.toString());
//    Stream<String> html = new Stream().bind(response);
//        Stream<String> html = Stream.castFrom(response);
//    html.listen((String markup) {
//      print(markup);
//    });
  });
  await Future.delayed(Duration(seconds: 1000));
}